package com.yoo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yoo.entity.Contact;
import com.yoo.repository.ContactRepository;

@Service
public class ContactServiceImpl extends ServiceImpl<ContactRepository, Contact> implements ContactService {

	@Autowired
	private ContactRepository contactRepository;

	@Override
	public List<Contact> queryByAuthorId(long authorId) {
		EntityWrapper<Contact> ew = new EntityWrapper<>();
		ew.eq("author_id", authorId);
		List<Contact> list = contactRepository.selectList(ew);
		return list;
	}
	
	
	
}
